---@class BuffEffect338100 : BaseBuffEffect
BuffEffect338100 = ClientFight.CreateClass("BuffEffect338100", ClientFight.BaseBuffEffect)
local t = BuffEffect338100

---@param fight Fight
---@param buff FighterBuff
function t:action(fight, buff, ...)
    local parameters = {...};
    local dieFighter = parameters[1];
    if (not dieFighter:isDie() or not dieFighter:isSummons()) then
        return IBuffEffect.FAIL;
    end
    if (dieFighter.summonsCreater ~= buff.source) then
        --不是自己召唤的不管
        return IBuffEffect.FAIL;
    end
    local effectValue = buff.buffBean.f_BuffEffectValue;
    SkillRoleMgr.savePathFile(string.format("[%s][EFFECT]卡拉buff%s 召唤物过期时,增加能量 :%s",
            fight.frame, buff.modelId, effectValue[1]
    ));
    FighterManager.addEnergy(fight, buff.target, 0, 0, effectValue[1], EnergyChangeReasonEnum.BUFF);
    return ClientFight.BaseBuffEffect.action(self, fight, buff, ...);
end

t.New()